Created 2025-06-10
jack.santucci@gmail.com -- for R questions
joshua_dyck@uml.edu -- for Stata questions

Files in this replication archive can be used to reproduce the figures, tables, and analyses in "Measuring Party Identification in Public Opinion Surveys of Americans" (Dyck and Santucci, POQ, 2025).

Scripts are prepared in R and Stata. The R scripts presume that the user has three folders: code, data, output. They also presume that the user's working directory is the "code" folder. Finally, the Stata scripts can be run in the usual way (i.e., opening them manually, then saving output manually).

Data sets are zipped along with their codebooks. The R scripts presume these are located in their respective folders, which, in turn, are located in the "data" folder.

R analyses were done in version 4.5.0 for Mac.

Stata analyses were done in SE 18.0 for Windows.

The rest of this readme file proceeds in order of the paper's figures and tables.

-----

Table 1 did not involve any data.

Figure 1 uses the ANES cumulative file and can be re-created in R using the script "01_plot_trends.R."

Figure 2 uses the ANES cumulative file, GSS cumulative file, and CES cumulative file and can be re-created in R using the script "01_plot_trends.R."

Table 2 did involve any data.

Figure 3 uses a 2019 YouGov survey ("MeasuringPID.2019YouGovdata.dta" in the "data" folder) and can be re-created using the script "MeasuringPID.2019YouGov.replicationcodes.do."

Table 3 uses the ANES cumulative file and can be re-created in R using the script "02_latent-ideo-regressions_pres-vote-crosstabs_validity-checks.R."

Table 4 uses the ANES cumulative file and can be re-created in R using the script "02_latent-ideo-regressions_pres-vote-crosstabs_validity-checks.R."

Table 5 uses the 2012 ANES time series and can be re-created from R output using the script "03_gender_race_educ.R."

Appendix Table B1 uses the ANES cumulative file and can be re-created from R output using the script "02_latent-ideo-regressions_pres-vote-crosstabs_validity-checks.R."

Appendix Table C1 uses the ANES cumulative file and can be re-created in R using the script "02_latent-ideo-regressions_pres-vote-crosstabs_validity-checks.R."

Appendix Table C2 uses a 2019 YouGov survey ("MeasuringPID.2019YouGovdata.dta" in the "data" folder) and can be re-created using the script "MeasuringPID.2019YouGov.replicationcodes.do."